const path = require('path'),
  webpack = require('webpack'),
  HtmlWebpackPlugin = require('html-webpack-plugin')

module.exports = {
  entry: {
    app: './src/app.js',
  },
  output: {
    filename: '[name].bundle.js',
    path: path.resolve('dist')
  },
  devServer: {
    contentBase: './dist',
    port: 9000,
    compress: true
  },
  plugins: [
    new HtmlWebpackPlugin({
      title: '拉勾-前端',
      filename: 'index.html',
      template: path.resolve('src', 'index.html')
    })
  ]
}
